package chap4.Task4_2;


import java.io.IOException;
import java.util.Properties;

public class Tesk {
    public static void main(String[] args) {
        //System:系统相关的属性
        Properties properties=System.getProperties();
        System.out.println(properties);

        Runtime rt = Runtime.getRuntime(); // 创建一个Runtime实例对象
        Process process = null;// 得到表示进程的Process对象
        try {
            process = rt.exec("notepad.exe");
        } catch (IOException e) {
            e.printStackTrace();
        }
        try {
            Thread.sleep(3000); // 程序休眠3秒
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        process.destroy(); // 杀掉进程

    }
}
